package models

// Niudantype undefined
type Goodtype struct {
	ID    int64  `json:"id" gorm:"id"`
	Name  string `json:"name" gorm:"name"`
	Image string `json:"image" gorm:"image"`
}

// TableName 表名称
func (*Goodtype) TableName() string {
	return "goodtype"
}

type Goodpp struct {
	ID   int64  `json:"id" gorm:"id"`
	Name string `json:"name" gorm:"name"`
}

// TableName 表名称
func (*Goodpp) TableName() string {
	return "goodpp"
}

// Goods undefined
type Goods struct {
	ID            int64   `json:"id" gorm:"id"`
	Goodtypeid    int64   `json:"goodtypeid" gorm:"goodtypeid"`
	Name          string  `json:"name" gorm:"name"`
	Image         string  `json:"image" gorm:"image"`
	Price         float64 `json:"price" gorm:"price"`                 // 售价
	Mojing        float64 `json:"mojing" gorm:"mojing"`               // 魔晶购买价
	Markeprice    float64 `json:"markeprice" gorm:"markeprice"`       // 市场价
	Recoveryprice float64 `json:"recoveryprice" gorm:"recoveryprice"` // 回收价
	Buyingprice   float64 `json:"buyingprice" gorm:"buyingprice"`     // 进货价
	Status        int64   `json:"status" gorm:"status"`
	Recommend     int64   `json:"recommend" gorm:"recommend"`
	Goodppid      int64   `json:"goodppid" gorm:"goodppid"`
	Collect       int64   `json:"collect" gorm:"collect"`
	Shangcheng    int64   `json:"shangcheng" gorm:"shangcheng"`
}

// TableName 表名称
func (*Goods) TableName() string {
	return "goods"
}

// Ordergood undefined
type Ordergood struct {
	ID        int64   `json:"id" gorm:"id"`
	Uid       int64   `json:"uid" gorm:"uid"`
	Goodid    int64   `json:"goodid" gorm:"goodid"`
	Addressid int64   `json:"addressid" gorm:"addressid"`
	Addtime   int64   `json:"addtime" gorm:"addtime"`
	Orderno   string  `json:"orderno" gorm:"orderno"`
	Status    int64   `json:"status" gorm:"status"` // 1待付款 2已付款
	Num       int64   `json:"num" gorm:"num"`
	Paystatus int64   `json:"paystatus" gorm:"paystatus"` // 1微信 2支付宝 3矿石 4魔晶 4微信小程序
	Price     float64 `json:"price" gorm:"price"`
	Beizhu    string  `json:"beizhu" gorm:"beizhu"`
	Qudao     string  `json:"qudao" gorm:"qudao"`
	Pricepay  int64   `json:"pricepay" gorm:"pricepay"`
}
type Ordergoodsql struct {
	ID        int64   `json:"id" gorm:"id"`
	Uid       int64   `json:"uid" gorm:"uid"`
	Goodid    int64   `json:"goodid" gorm:"goodid"`
	Addressid int64   `json:"addressid" gorm:"addressid"`
	Addtime   int64   `json:"addtime" gorm:"addtime"`
	Orderno   string  `json:"orderno" gorm:"orderno"`
	Status    int64   `json:"status" gorm:"status"` // 1待付款 2已付款
	Num       int64   `json:"num" gorm:"num"`
	Paystatus int64   `json:"paystatus" gorm:"paystatus"` // 1微信 2支付宝 3矿石 4魔晶 4微信小程序
	Price     float64 `json:"price" gorm:"price"`
	Goodname  string  `json:"goodname" gorm:"goodname"`
	Goodimage string  `json:"goodimage" gorm:"goodimage"`
	Phone     string  `json:"phone" gorm:"phone"`       // 手机号
	Nickname  string  `json:"nickname" gorm:"nickname"` // 昵称
	Qudao     string  `json:"qudao" gorm:"qudao"`
	Laiyuan   int64   `json:"laiyuan" gorm:"laiyuan"`
}

// TableName 表名称
func (*Ordergood) TableName() string {
	return "ordergood"
}

// 我的商品 undefined
type Usergood struct {
	ID             int64   `json:"id" gorm:"id"`
	Uid            int64   `json:"uid" gorm:"uid"`
	State          int64   `json:"state" gorm:"state"`   // 1直接购买 2扭蛋机 3一番赏 4魔晶兑换 5vip领取
	Status         int64   `json:"status" gorm:"status"` // 1待确认 2待发货 3已发货4已锁定 5已分解 6已下架
	Addtime        int64   `json:"addtime" gorm:"addtime"`
	Updatetime     int64   `json:"updatetime" gorm:"updatetime"`
	Goodid         int64   `json:"goodid" gorm:"goodid"`
	Goodname       string  `json:"goodname" gorm:"goodname"`
	Goodprice      float64 `json:"goodprice" gorm:"goodprice"`
	Goodmojing     float64 `json:"goodmojing" gorm:"goodmojing"`
	Goodimage      string  `json:"goodimage" gorm:"goodimage"`
	Num            int64   `json:"num" gorm:"num"`
	Orderid        int64   `json:"orderid" gorm:"orderid"`
	Usergoodareaid int64   `json:"usergoodareaid" gorm:"usergoodareaid"`
	Shouhuo        int64   `json:"shouhuo" gorm:"shouhuo"` //0全部 1运输中 2已收货 3未发货
	Kdorder        string  `json:"kdorder" gorm:"kdorder"`
	Kuaidi         string  `json:"kuaidi" gorm:"kuaidi"`
}
type Usergoodsql struct {
	ID             int64   `json:"id" gorm:"id"`
	Uid            int64   `json:"uid" gorm:"uid"`
	State          int64   `json:"state" gorm:"state"`   // 1直接购买 2扭蛋机 3一番赏 4魔晶兑换 5vip领取
	Status         int64   `json:"status" gorm:"status"` // 1待确认 2待发货 3已发货4已锁定 5已分解 6已下架
	Addtime        int64   `json:"addtime" gorm:"addtime"`
	Goodid         int64   `json:"goodid" gorm:"goodid"`
	Goodname       string  `json:"goodname" gorm:"goodname"`
	Goodprice      float64 `json:"goodprice" gorm:"goodprice"`
	Goodmojing     float64 `json:"goodmojing" gorm:"goodmojing"`
	Goodimage      string  `json:"goodimage" gorm:"goodimage"`
	Num            int64   `json:"num" gorm:"num"`
	Usergoodareaid int64   `json:"usergoodareaid" gorm:"usergoodareaid"`
	Shouhuo        int64   `json:"shouhuo" gorm:"shouhuo"`   //0全部 1运输中 2已收货
	Phone          string  `json:"phone" gorm:"phone"`       // 手机号
	Nickname       string  `json:"nickname" gorm:"nickname"` // 昵称
	Kdorder        string  `json:"kdorder" gorm:"kdorder"`
	Kuaidi         string  `json:"kuaidi" gorm:"kuaidi"`
}

// TableName 表名称
func (*Usergood) TableName() string {
	return "usergood"
}

// 我的商品发货信息 undefined
type Usergoodarea struct {
	ID        int64   `json:"id" gorm:"id"`
	Uid       int64   `json:"uid" gorm:"uid"`
	Addressid int64   `json:"addressid" gorm:"addressid"`
	Province  string  `json:"province" gorm:"province"`
	City      string  `json:"city" gorm:"city"`
	County    string  `json:"county" gorm:"county"`
	Area      string  `json:"area" gorm:"area"`
	Addtime   int64   `json:"addtime" gorm:"addtime"`
	Name      string  `json:"name" gorm:"name"`
	Phone     string  `json:"phone" gorm:"phone"`
	Orderno   string  `json:"orderno" gorm:"orderno"`
	Beizhu    string  `json:"beizhu" gorm:"beizhu"`
	Goodids   string  `json:"goodids" gorm:"goodids"`
	Kdstatus  int64   `json:"kdstatus" gorm:"kdstatus"` // 快递状态 1待发货 10待支付
	Qudao     string  `json:"qudao" gorm:"qudao"`
	Kdprice   float64 `json:"kdprice" gorm:"kdprice"`
	Pricepay  int64   `json:"pricepay" gorm:"pricepay"`
	//Kuaidi    Kuaidi   `gorm:"ForeignKey:Usergoodid;AssiciationForeignKey:Id"`
}
type Usergoodareasql struct {
	ID        int64   `json:"id" gorm:"id"`
	Uid       int64   `json:"uid" gorm:"uid"`
	Addressid int64   `json:"addressid" gorm:"addressid"`
	Province  string  `json:"province" gorm:"province"`
	City      string  `json:"city" gorm:"city"`
	County    string  `json:"county" gorm:"county"`
	Area      string  `json:"area" gorm:"area"`
	Addtime   int64   `json:"addtime" gorm:"addtime"`
	Name      string  `json:"name" gorm:"name"`
	Phone     string  `json:"phone" gorm:"phone"`
	Orderno   string  `json:"orderno" gorm:"orderno"`
	Beizhu    string  `json:"beizhu" gorm:"beizhu"`
	Goodids   string  `json:"goodids" gorm:"goodids"`
	Kdstatus  int64   `json:"kdstatus" gorm:"kdstatus"` // 快递状态 1待发货 10待支付
	Qudao     string  `json:"qudao" gorm:"qudao"`
	Kdprice   float64 `json:"kdprice" gorm:"kdprice"`
	Pricepay  int64   `json:"pricepay" gorm:"pricepay"`
	Userphone int64   `json:"userphone" gorm:"userphone"`
	//Fahuostatus int64      `json:"fahuostatus" gorm:"fahuostatus"` //1未发货 2部分发货 3全部发货
	Usergood []Usergood `gorm:"ForeignKey:Usergoodareaid;AssiciationForeignKey:Id"`
	//Kuaidi    Kuaidi   `gorm:"ForeignKey:Usergoodid;AssiciationForeignKey:Id"`
}

// TableName 表名称
func (*Usergoodarea) TableName() string {
	return "usergoodarea"
}

// Kuaidi undefined
type Kuaidi struct {
	ID         int64  `json:"id" gorm:"id"`
	Usergoodid int64  `json:"usergoodid" gorm:"usergoodid"`
	Time       string `json:"time" gorm:"time"`
	Title      string `json:"title" gorm:"title"`
}

// TableName 表名称
func (*Kuaidi) TableName() string {
	return "kuaidi"
}
